package com.openbravo.pos.ticket;

import java.util.HashSet;
import java.util.Set;

public class Signumprovider
{
  private Set m_positives = new HashSet();
  private Set m_negatives = new HashSet();

  public void addPositive(Object paramObject)
  {
    this.m_positives.add(paramObject);
  }

  public void addNegative(Object paramObject)
  {
    this.m_negatives.add(paramObject);
  }

  public Double correctSignum(Object paramObject, Double paramDouble)
  {
    if (this.m_positives.contains(paramObject))
      return paramDouble.doubleValue() < 0.0D ? new Double(-paramDouble.doubleValue()) : paramDouble;
    if (this.m_negatives.contains(paramObject))
      return paramDouble.doubleValue() > 0.0D ? new Double(-paramDouble.doubleValue()) : paramDouble;
    return paramDouble;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.ticket.Signumprovider
 * JD-Core Version:    0.6.0
 */